package com.entfrm.biz.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.entfrm.biz.system.entity.TProduct;
import org.apache.ibatis.annotations.Update;

public interface TProductMapper extends BaseMapper<TProduct> {
    /**
     * 根据ID更改上下架
     * @param id 商品编号
     * @param ground 上下架状态
     */
    @Update("update t_product set ground =#{ground} where product_id = #{id}")
    public void updateGround(String id, String ground);

    /**
     * 根据ID更改上下架
     * @param ownerId 购买人ID
     * @param id 商品ID
     *  @param ownerName 购买人姓名
     */
    @Update("update t_product set owner_id =#{ownerId} , owner_name=#{ownerName} where product_id = #{productId}")
    public void updateOwn(String ownerId, String productId, String ownerName);
}
